name: TON Static Code Analysis

on: [push,workflow_dispatch,workflow_call]

jobs:
  build:
    runs-on: ubuntu-22.04

    steps:
    - name: Check out repository
      uses: actions/checkout@v3
      with:      
        submodules: 'recursive'

    - name: Run Cppcheck
      uses: Bedzior/run-cppcheck@master
      with:
        enabled checks: all
        enable inconclusive: true
        generate report: true

    - name: Upload report
      uses: actions/upload-artifact@v1
      with:
        name: ton-ccpcheck-report
        path: output
